package com.irun.cm;

import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ListActivity;
import android.content.Context;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.AbsListView;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemLongClickListener;
import android.widget.ListView;

/***
 * @author huangsm
 * @date 2012-4-16
 * @email huangsanm@gmail.com
 * @desc 信息列表
 */
public class MessageListActivity extends ListActivity implements OnItemLongClickListener {
	
	//dialog
	private final static int DIALOG_LIST_ITEM = Menu.FIRST;
	
	private Context mContext;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.message_list);
		mContext = this;
		getListView().setOnItemLongClickListener(this);
		MessageListItemAdapter adapter = new MessageListItemAdapter(mContext);
		setListAdapter(adapter);
	}
	
	@Override
	protected void onListItemClick(ListView listView, View view, int position, long id) {
		super.onListItemClick(listView, view, position, id);
		
	}
	
	@Override
	public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
		
		return false;
	}
	
	@Override
	protected void onPrepareDialog(int id, Dialog dialog) {
		super.onPrepareDialog(id, dialog);
		
	}
	
	@Override
	protected Dialog onCreateDialog(int id) {
		Dialog dialog = null;
		if(id == DIALOG_LIST_ITEM){
			AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
		}
		return dialog;
	}
}

